<extend name="Public:mainbase" />
<block name="content">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/dhtmlxtree.css"/>
    <script language="javascript" src="__PUBLIC__/js/member.js?{:time()}"></script>
    <script language="javascript" src="__PUBLIC__/js/Validform_v5.3.2_min.js?{:time()}"></script>
    <style type="text/css">
        .Validform_checktip{line-height: 34px}
    </style>
    <!--  内容列表   -->
    <form name="form2" method="post">
        <table width="98%" class="table table-bordered  table-hover table-condensed "  align="center">
            <tr bgcolor="#E7E7E7" >
                <td height="28" colspan="11" background="__PUBLIC__/images/tbg.gif" style="padding-left:10px;">
                    ◆ 专题列表
                </td>
            </tr>
            <tr align="center" bgcolor="#FBFCE2" height="25">
                <td width="4%">选择</td>
                <td width="10%">专题ID</td>
                <td>专题名称</td>
                <td>状态</td>
                <td>创建时间</td>
                <td>排序</td>
                <td width="10%">操作</td>
            </tr>
            <foreach name="pList" item="val">
                <tr align='center' bgcolor="#FFFFFF" height="26">
                    <td>
                        <input name="sid" type="checkbox" value="{$val.id}" class="np" />
                    </td>
                    <td nowrap>{$val.id}</td>
                    <td>{$val.name}</td>
                    <td><?php echo $val['status'] ? '使用中' : '已冻结' ?></td>
                    <td>{$val.create_time|myDate="Y-m-d H:i",###}</td>
                    <td>{$val.psort}</td>
                    <td>
                        <a href="javascript:;" class='setSort' data-id="{$val.pubid}">设置排序</a>
                        |
                        <a href="{:U('delSpecialContent')}?id={$val.pubid}" class='addLive'>删除</a>
                    </td>
                </tr>
            </foreach>
    </form>
    <tr align="right" bgcolor="#F9FCEF">
        <td height="36" colspan="11" align="center">
            <div class='page'>{$showpage}</div>
        </td>
    </tr>
    </table>

      搜索表单
    <form name='form3' action='' method='get'>
    <input type='hidden' name='dopost' value='listArchives' />
    <table width='98%'  class='table' align="center" style="margin-top:8px">
        <tr bgcolor='#EEF4EA'>
            <td background='__PUBLIC__/images/wbg.gif' align='center'>
                <table border='0' cellpadding='0' cellspacing='0' height="32">
                    <tr>
                        <td nowrap>专题名称：</td>
                        <td width='130'>
                            <input type='text' name='name' value='' style='width:120px' />
                        </td>
                    <td>
                        <input name="imageField" type="image" src="__PUBLIC__/images/button_search.gif" width="60" height="22" border="0" class="np" />
                    </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    </form>
    <style type="text/css">
        .editarticlebox{ z-index: 900 !important; }
        .modal-backdrop{z-index: 800 !important; }
    </style>

<div class="modal fade setsortbox" tabindex="-1" Auth="dialog" aria-labelledby="add_user_jump" id='setsortbox'>
  <div class="modal-dialog modal-sm" style="width:40%">
        
    <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title" id="myModalLabel">设置排序</h4>
        </div>
        <form action="{:U('setResourceSort')}" method="POST" class="form-horizontal" id="addcategoryform" style="padding:15px 0" enctype="multipart/form-data">
        <input type="hidden" name="id" value="0" />
        <div class="form-group">
            <label for="image_url" class="col-sm-2 control-label">排序</label>
            <div class="col-sm-5">
                <input name="sort" type="text" class="form-control" value="0" />
            </div>   
        </div>
        <div class="add-error-message error item"></div>

        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
              <button type="submit" class="btn btn-success">确定修改</button>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
              <button type="button" class="btn btn-danger"  data-dismiss="modal">取消</button>
            </div>
       </div>
       </form>
    </div>
  </div>
</div>

<script>

    $('.setSort').click(function () {
        $('#setsortbox [name=id]').val($(this).data('id'));
        $.get("{:U('ajaxGetSort')}?id="+$(this).data('id'),function(data){
            if(data!=0){
                $("#setsortbox [name=sort]").val(data['sort']);      
            }
        })
        $('#setsortbox').modal('show');
    })   
</script>
</block>